11 reliability engineering
Available != reliable
Errors: human, system fault vs system errors, system failure

Errors can be transient
May detect and correct
Not code is executed
Users adapt to errors

Fault avoidance
Fault detection and correction
Fault tolerance
Not always cost effective
(ALWAYS faults remaining)

Availability: probability operational
	(time of day)
Reliability: probability of failure free operation
	(time, environment, purpose)

Specifications often incomplete/incorrect/ambiguous/unread
Judgement made by users

Requirements
	Polish airport: software worked according to specifications
		Specifications were wrong
		Plane, as programmed, did not allow reverse thrust
		(on landing)
	Functional
	Non-functional
Measures:
	POFOD probability of failure on demand
	ROCOF rate of occurrences of failures
	AVAIL probability available when demanded
	MTTF mean time to failure
11.2.2
Deciding quantitative levels
	Clarify needs
	Basis to stop testing
Assess design strategies
Evidence for regulators

Requirements can be different for different types of failure
	…for different types of system service
	Is high reliability required?
		Error detection
		Error correction
BANKS
	ATM one transaction
		Error –restart transaction
	ATM runs out of cash
	losing Database
insulin pump
	transient
	permanent
11.2.3 functional reliability specification
	Checking requirement
	Recovery requirement
	Redundancy requirements
	Process requirements
11.3 fault tolerance
	Replicated/redundant and diverse
	Fault detection/correction handling
	Fault avoidance
Require high availability
	Critical
	Cannot go into safe mode
	Monitoring for fault may need different sensors
	“get you home”

Self-monitoring
	Diverse hardware
	Diverse software

(medical: reliability is more important)
(airplanes: availability is more important)	

N-version programming
	Assume component failure is the problem
Software diversity
	Different design methods
	Different languages
	Different environments
	Different algorithms/approaches
BUT
	Teams from same background, friends
	Requirements incorrect
	Environment can be misunderstood

11.4 programming for reliability
	Control visibility of information
		(need to know; OOP)
	Check all inputs for validity
		Range, size, representation, reasonableness
	Provide a handler for all exceptions
		Signal exception, alternative processing, pass control to handler
	Minimize error prone constructs
		Floating point numbers
		Linked/dynamic allocation
	provide restart
	check array bounds
	initialize all variables
	timeout for external component
	name all constants

11.5 reliability measurement
	Measure number of calls
	Measure number of failures
	Collect over time or over 1000 transactions
	Statistical testing
		NOT fault finding
		Look at similar systems
		Construct test data
			Same distribution
			Test with that data
			Count failures
	Difficulties
		Might not be accurate
		Cost of testing
		High reliability (uncertainty)
		Can be hard to recognize failure	
Innovation is harder to evaluate